﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace SetListManager.Models
{
    /// <summary>
    /// Static class to get/set current band.  Since this is used often and set infrequently,
    /// we use this class as an optimization.
    /// 
    /// This is set during the login phase -- after the user logs in, they select which
    /// band they want to operate on.  If only 1 band, it defaults to that one.
    /// </summary>
    static class CurrentBand
    {
        // TODO: Implement this using session variables for effeciency
        public static int ID { 
            get { return 1;}
            set {}
        }
        public static string Name
        {
            get { return "The Castaways Band"; }
            set { }
        }
    }

    public class Band
    {
        /// <summary>
        /// The ID used as the primary key
        /// </summary>
        public int BandID { get; set; }

        public int CountBandMembers { get; set; }

        /// <summary>
        /// Band Name
        /// </summary>
        [StringLength(100)]
        [Required(ErrorMessage = "Band Name must be specified")]
        [Display(Name="Band Name")]
        public string Name { get; set; }

        // *********************
        // *** BAND SETTINGS ***
        // *********************

        // Description of the custom fields the band uses for their songs.
        // These are set to default values in the UI, but can be changed.

        [StringLength(25)]
        [Display(Name="Custom Note #1 Description")]
        public string Note1Name { get; set; }
        [Display(Name = "Display Custom Note #1 as a Column?")]
        public bool Note1IsColumn { get; set; }

        [StringLength(25)]
        [Display(Name = "Custom Note #2 Description")]
        public string Note2Name { get; set; }
        [Display(Name = "Display Custom Note #2 as a Column?")]
        public bool Note2IsColumn { get; set; }

        [StringLength(25)]
        [Display(Name = "Custom Note #3 Description")]
        public string Note3Name { get; set; }
        [Display(Name = "Display Custom Note #3 as a Column?")]
        public bool Note3IsColumn { get; set; }

        [StringLength(25)]
        [Display(Name = "Custom Note #4 Description")]
        public string Note4Name { get; set; }
        [Display(Name = "Display Custom Note #4 as a Column?")]
        public bool Note4IsColumn { get; set; }

        [StringLength(25)]
        [Display(Name = "Custon Note #5 Description")]
        public string Note5Name { get; set; }
        [Display(Name = "Display Custom Note #5 as a Column?")]
        public bool Note5IsColumn { get; set; }

        
        /// <summary>
        /// The date and time when this band was created in the system
        /// </summary>
        // public DateTime CreateDate { get; set; }



        /// <summary>
        /// A collection of all the band's songs
        /// </summary>
//        public virtual ICollection<Song> Songs { get; set; }
    }
}
